﻿; (function (global) {

    'use strict';

    global.Levels = global.Levels || {};

    Levels.Medium = function Medium() {
    }

    Levels.Medium.getAllowedStrategies = function () {
        var strats = []
        strats.push(new Strategies.NakedSingle());
        strats.push(new Strategies.HiddenSingle());
        strats.push(new Strategies.PointingPair());
        strats.push(new Strategies.PointingInside());
        strats.push(new Strategies.NakedPair());
        return strats;
    }

    Levels.Medium.checkRequiredStrategies = function (strategies) {
        var pointingInsideOk = false;
        var pointingPairOk = false;
        var nakedPairOk = false;
        for (var i = 0; i < strategies.length; i++) {
            var strategy = strategies[i];
            if (strategy instanceof Strategies.PointingInside) {
                pointingInsideOk = true;
            }

            else if (strategy instanceof Strategies.PointingPair) {
                pointingPairOk = true;
            }

            else if (strategy instanceof Strategies.NakedPair) {
                nakedPairOk = true;
            }
        }

        return nakedPairOk && (pointingInsideOk || pointingPairOk);
    }

    Levels.Medium.hasEnoughEmpty = function (emptyCount) {
        return false;
    }
}(this));
